Skip to content

Fixed spinner not loading when blog posts are loading#12

Open
davenpos wants to merge 1 commit intomainfrom
simeon-davenport/fix-spinner
Open

Fixed spinner not loading when blog posts are loading#12
davenpos wants to merge 1 commit intomainfrom
simeon-davenport/fix-spinner

Conversation

@davenpos
Copy link
Copy Markdown
Collaborator

No description provided.

@EvanPrograms
Copy link
Copy Markdown
Collaborator

EvanPrograms commented Mar 18, 2025

So the problem with this code is now the fetchBlogs call is client side rather than server side. We want the blogs to be found via SEO.

@davenpos
Copy link
Copy Markdown
Collaborator Author

I don't think there is a way to both have fetchBlogs be client side AND have the loading spinner icon appear while blogs are loading. The BlogClientList component has to be client side in order to support useState and useEffect, and the loading spinner icon can't appear until the blogs have loaded, which can only be determined by useState and useEffect.

@EvanPrograms
Copy link
Copy Markdown
Collaborator

EvanPrograms commented Mar 19, 2025

You know, if we are serving up the HTML with the server already having fetched the data, perhaps the loading spinner isn't necessary at all.

@davenpos
Copy link
Copy Markdown
Collaborator Author

Actually, I may be able to do this with a Suspense. Hang on, let me try and see if I can do it that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants